﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using EzDesk.Core.Model;

using System.Xml.Linq;

namespace EzDesk.Core.Interface
{
    [ServiceContract]
    public interface ICoreClientService
    {
        #region [ Globle Info ]
        [OperationContract]
        Organization GetOrganizationInfo();
        #endregion

        #region [ App Functions Method ]

        [OperationContract]
        IList<AppFunction> GetAllAppFunctions(Guid userId);

        [OperationContract]
        IList<AppFunctionType> GetAllAppFunctionTypes(Guid userId);

        [OperationContract]
        IList<AppFunction> GetAppFunctionsByTypeName(Guid userId, string appFunctionTypeName);

        [OperationContract]
        IList<AppFunctionType> GetAllAppFunctionCategories(Guid userId);

        [OperationContract]
        IList<AppFunction> GetAppFunctionsByCategoryName(Guid userId, string categoryName);

        [OperationContract]
        string GetAppFunctionShortcutIds(Guid userId);
        [OperationContract]
        void UpdateAppFunctionShortcutSequnce(Guid userId, string shortCutIdSequnces);

        #endregion

        #region [ Feed Methods]

        [OperationContract]
        string GetXmlFeedsBetweenDate(string feedTypeStr, Guid userId, DateTime from, DateTime to, bool? isRead, bool? isAvaiable, bool? isMark);
        [OperationContract]
        string GetXmlFeedsByCount(string feedTypeStr, Guid userId, int startIndex, int count, bool? isRead, bool? isAvaiable, bool? isMark);
        [OperationContract]
        string GetAllXmlFeedsBetweenDate(Guid userId, DateTime from, DateTime to, bool? isRead, bool? isAvaiable, bool? isMark);
        [OperationContract]
        string GetAllXmlFeedsByCount(Guid userId, int startIndex, int count, bool? isRead, bool? isAvaiable, bool? isMark);
        
        [OperationContract]
        void SetUserStatus(Guid userId, Guid feedId);

        [OperationContract]
        Guid GetUserStatus(Guid userId);


        [OperationContract]
        void UpdateFeedStatus(IList<FeedStatus> feeds, string memberString);

        #endregion

        #region [ UserProfile Method ]

        [OperationContract]
        UserProfile GetUserProfileById(Guid userId);

        [OperationContract]
        SimpleUser GetSimpleUserById(Guid userId);

        [OperationContract]
        IList<SimpleUser> GetSimpleUserInfos(string memberstring);

        [OperationContract]
        Dept GetDeptById(Guid deptId);

        #endregion

        #region [ Clients Management ]
        [OperationContract]
        string GetClientBaseUrl();
        #endregion

    }
}
